<template>
    <div class="product">
        <div class="product-top">
            <img src="../assets/beijing.jpg" width="100%" alt="">
        </div>
        <div class="col-12 title">
            <p>产品中心</p>
        </div>
        <div class="product-area col-12">
            <div class="col-10 area">
                <li v-for="(item, index) in polaroid" :key="index">
                    <div class="polaroid col-4">
                        <img :src="item.image" alt="" width="90%">
                        <div class="container">
                            <p>{{item.name}}</p>
                        </div>
                    </div>
                </li>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'product',
        data() {
            return {
                polaroid : [
                    {"name" : "米酒产品系列", "image" : require('../assets/17.jpg')},
                    {"name" : "白酒产品系列", "image" : require('../assets/13.jpg')},
                    {"name" : "黄酒产品系列", "image" : require('../assets/16.jpg')},
                    {"name" : "葡萄酒产品系列", "image" : require('../assets/15.jpg')},
                    {"name" : "啤酒产品系列", "image" : require('../assets/14.jpg')},
                    {"name" : "药酒产品系列", "image" : require('../assets/18.jpg')},
                ]
            }
        },
    }
</script>

<style>
    * {
        margin: 0;
        padding: 0;
        font-family: 'Microsoft YaHei';
        list-style: none;
        /* 响应式网格 */
        box-sizing: border-box;
    }
    [class*="col-"] {
    float: left;
    padding: 15px;
    /* border: 1px solid red; */
    }
    .col-1 {width: 8.33%;}
    .col-2 {width: 16.66%;}
    .col-3 {width: 25%;}
    .col-4 {width: 33.33%;}
    .col-5 {width: 41.66%;}
    .col-6 {width: 50%;}
    .col-7 {width: 58.33%;}
    .col-8 {width: 66.66%;}
    .col-9 {width: 75%;}
    .col-10 {width: 83.33%;}
    .col-11 {width: 91.66%;}
    .col-12 {width: 100%;}

    .product{
        max-width: 100%;
    }
    .product-top {
        padding-left: 0px;
        padding-right: 0px;
        height: auto;
    }
    .product-area {
        background-color:powderblue;
    }
    .area {
        margin: 0 auto;
        padding: 0px;
        height: auto;
        float: none;
        border: none;
    }
    .polaroid {
        max-width: 100%;
        height: auto;
        width: 30%;
        margin: 20px;
        background-color: rgb(182, 46, 46);
        box-shadow: 0 4px 8px 0 rgba(190, 41, 41, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.3);
    }
    
    .polaroid img {
        padding-top: 10px;
        padding-bottom: 5px;
        cursor: pointer;
        transform: scale(1);
        transition: transform .5s;
    }
    /* 鼠标放到图片上放大 */
    .polaroid:hover img {
        transform: scale(1.2);
        -webkit-transform: scale(1.1);
    }
    /* 标题  */
    .title {
        font-size: 2rem;
        border: none;
    }
    /* 产品下的介绍 */
    .container {
        color: #fff;
        font-size: 1.5rem;
        text-align: center;
        padding-top: 10px;
    }
    /* 窗口小于1800px */
    @media only screen and (max-width: 1800px) {
        .product{
            background-color: #fff;
        }
        .product-top {
            padding-left: 0px;
            padding-right: 0px;
            height: auto;
        }
        .product-area {
            background-color:powderblue;
        }
        .area {
            margin: 0 auto;
            padding: 0px;
            height: auto;
            float: none;
            border: none;
        }
        .polaroid {
            max-width: 100%;
            height: auto;
            width: 30%;
            margin: 20px;
            background-color: rgb(182, 46, 46);
            box-shadow: 0 4px 8px 0 rgba(190, 41, 41, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.3);
        }
        
        .polaroid img {
            cursor: pointer;
            transform: scale(1);
            transition: transform .5s;
        }
        /* 鼠标放到图片上放大 */
        .polaroid:hover img {
            transform: scale(1.2);
            -webkit-transform: scale(1.1);
        }
        /* 标题  */
        .title {
            font-size: 2rem;
            border: none;
            background: linear-gradient(-135deg, rgba(255, 93, 177, 0.9) 0%, rgba(0, 87, 137, 0.7) 100%);
        }
        /* 产品下的介绍 */
        .container {
            color: #fff;
            font-size: 1.5rem;
            text-align: center;
            padding-top: 10px;
        }
    }
    /* 窗口小于1024px */
    @media only screen and (max-width: 1024px) {
        .product{
            background-color: #fff;
        }
        .product-top {
            padding-left: 0px;
            padding-right: 0px;
            height: auto;
        }
        .product-area {
            margin: 0 auto;
            width: 100%;
            background-color:powderblue;
        }
        .area {
            margin: 0 auto;
            padding: 0px;
            height: auto;
            float: none;
            border: none;
        }
        .polaroid {
            max-width: 100%;
            height: auto;
            width: 45%;
            margin: 20px;
            background-color: rgb(182, 46, 46);
            box-shadow: 0 4px 8px 0 rgba(190, 41, 41, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.3);
        }
        
        .polaroid img {
            cursor: pointer;
            transform: scale(1);
            transition: transform .5s;
        }
        /* 鼠标放到图片上放大 */
        .polaroid:hover img {
            transform: scale(1.2);
            -webkit-transform: scale(1.1);
        }
        /* 标题  */
        .title {
            font-size: 2rem;
            border: none;
            background: linear-gradient(-135deg, rgba(255, 93, 177, 0.9) 0%, rgba(0, 87, 137, 0.7) 100%);
        }
        /* 产品下的介绍 */
        .container {
            color: #fff;
            font-size: 1.5rem;
            text-align: center;
            padding-top: 10px;
        }
    }
    /* 窗口小于768px */
    @media only screen and (max-width: 768px) {
        .product{
            background-color: #fff;
        }
        .product-top {
            padding-left: 0px;
            padding-right: 0px;
            height: auto;
        }
        .product-area {
            margin: 0 auto;
            width: 100%;
            background-color:powderblue;
        }
        .area {
            margin: 0 auto;
            padding: 0px;
            height: auto;
            float: none;
            border: none;
        }
        .polaroid {
            max-width: 100%;
            height: auto;
            width: 45%;
            margin: 15px;
            background-color: rgb(182, 46, 46);
            box-shadow: 0 4px 8px 0 rgba(190, 41, 41, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.3);
        }
        
        .polaroid img {
            cursor: pointer;
            transform: scale(1);
            transition: transform .5s;
        }
        /* 鼠标放到图片上放大 */
        .polaroid:hover img {
            transform: scale(1.2);
            -webkit-transform: scale(1.1);
        }
        /* 标题  */
        .title {
            font-size: 2rem;
            border: none;
            background: linear-gradient(-135deg, rgba(255, 93, 177, 0.9) 0%, rgba(0, 87, 137, 0.7) 100%);
        }
        /* 产品下的介绍 */
        .container {
            color: #fff;
            font-size: 1.5rem;
            text-align: center;
            padding-top: 10px;
        }
    }
    /* 窗口小于480 */
    @media only screen and (max-width: 480px) {
        .product{
            background-color: #fff;
        }
        .product-top {
            padding-left: 0px;
            padding-right: 0px;
            height: auto;
        }
        .product-top img{
            height: 120px;
            width: 100%;
        }
        .product-area {
            margin: 0 auto;
            width: 100%;
            background-color:powderblue;
        }
        .area {
            margin: 0 auto;
            padding: 0px;
            height: auto;
            float: none;
            border: none;
        }
        .polaroid {
            max-width: 100%;
            height: auto;
            width: 100%;
            margin: 10px 0;
            background-color: rgb(182, 46, 46);
            box-shadow: 0 4px 8px 0 rgba(190, 41, 41, 0.3), 0 6px 20px 0 rgba(0, 0, 0, 0.3);
        }
        
        .polaroid img {
            cursor: pointer;
            transform: scale(1);
            transition: transform .5s;
        }
        /* 鼠标放到图片上放大 */
        .polaroid:hover img {
            transform: scale(1.2);
            -webkit-transform: scale(1.1);
        }
        /* 标题  */
        .title {
            font-size: 1.2rem;
            font-weight: 500;
            border: none;
            background: linear-gradient(-135deg, rgba(255, 93, 177, 0.9) 0%, rgba(0, 87, 137, 0.7) 100%);
        }
        /* 产品下的介绍 */
        .container {
            color: #fff;
            font-size: 1.5rem;
            text-align: center;
            padding-top: 10px;
        }
    }
</style>